<?php

/**
 * Dojo File Input
 * 
 * Depende de UploadsController
 * 
 * 
 * @category Zwei
 * @package Zwei_Admin
 * @subpackage Elements
 * @version $Id:$
 * @author Rodrigo Riquelme <rodrigo.riquelme.e@gmail.com>
 * @license GNU GPL-v2 http://www.gnu.org/licenses/gpl-2.0.html
 * @since 0.1
 * @link http://code.google.com/p/xml-admin/
 */

class Zwei_Admin_Elements_DojoFileInput extends Zwei_Admin_Elements_Element
{
	
	function edit($i, $j, $display="block"){
    	$disabled = @$this->params['DISABLED'] ? ", disabled: true" : '';
    	
    	$url = @$this->params['URL'] ? "url=\"".BASE_URL.$this->params['URL']."\"": '';
  	
        $html="<iframe src=\"".BASE_URL."uploads?id={$this->params['ID']}\" class=\"ifrm_input\" frameborder=\"0\"></iframe>";        
     	return $html;
	}
  
	function get($value){
    	return $value!=$this->value ? $this->value : 0;
	}
}
?>